package KernelCmIRPSystem;


/**
 * Generated from IDL interface "_KernelCmIrpOperations".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public abstract class _KernelCmIrpOperationsPOA
	extends org.omg.PortableServer.Servant
	implements org.omg.CORBA.portable.InvokeHandler, KernelCmIRPSystem._KernelCmIrpOperationsOperations
{
	static private final java.util.Hashtable m_opsHash = new java.util.Hashtable();
	static
	{
		m_opsHash.put ( "get_kernel_cm_irp_operations_profile", new java.lang.Integer(0));
		m_opsHash.put ( "get_kernel_cm_irp_versions", new java.lang.Integer(1));
		m_opsHash.put ( "get_kernel_cm_irp_notification_profile", new java.lang.Integer(2));
		m_opsHash.put ( "get_nrm_irp_version", new java.lang.Integer(3));
	}
	private String[] ids = {"IDL:KernelCmIRPSystem/KernelCmIrpOperations:1.0"};
	public KernelCmIRPSystem._KernelCmIrpOperations _this()
	{
		return KernelCmIRPSystem._KernelCmIrpOperationsHelper.narrow(_this_object());
	}
	public KernelCmIRPSystem._KernelCmIrpOperations _this(org.omg.CORBA.ORB orb)
	{
		return KernelCmIRPSystem._KernelCmIrpOperationsHelper.narrow(_this_object(orb));
	}
	public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler)
		throws org.omg.CORBA.SystemException
	{
		org.omg.CORBA.portable.OutputStream _out = null;
		// do something
		// quick lookup of operation
		java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method );
		if ( null == opsIndex )
			throw new org.omg.CORBA.BAD_OPERATION(method + " not found");
		switch ( opsIndex.intValue() )
		{
			case 0: // get_kernel_cm_irp_operations_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_kernel_cm_irp_operations_profile(_arg0));
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(KernelCmIRPSystem.GetKernelCMIRPOperationsProfileException _ex2)
			{
				_out = handler.createExceptionReply();
				KernelCmIRPSystem.GetKernelCMIRPOperationsProfileExceptionHelper.write(_out, _ex2);
			}
				break;
			}
			case 1: // get_kernel_cm_irp_versions
			{
			try
			{
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.VersionNumberSetHelper.write(_out,get_kernel_cm_irp_versions());
			}
			catch(KernelCmIRPSystem.GetKernelCMIRPVersionsException _ex0)
			{
				_out = handler.createExceptionReply();
				KernelCmIRPSystem.GetKernelCMIRPVersionsExceptionHelper.write(_out, _ex0);
			}
				break;
			}
			case 2: // get_kernel_cm_irp_notification_profile
			{
			try
			{
				java.lang.String _arg0=_input.read_string();
				_out = handler.createReply();
				ManagedGenericIRPConstDefs.MethodListHelper.write(_out,get_kernel_cm_irp_notification_profile(_arg0));
			}
			catch(ManagedGenericIRPSystem.InvalidParameter _ex0)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.InvalidParameterHelper.write(_out, _ex0);
			}
			catch(ManagedGenericIRPSystem.OperationNotSupported _ex1)
			{
				_out = handler.createExceptionReply();
				ManagedGenericIRPSystem.OperationNotSupportedHelper.write(_out, _ex1);
			}
			catch(KernelCmIRPSystem.GetKernelCMIRPNotificationProfileException _ex2)
			{
				_out = handler.createExceptionReply();
				KernelCmIRPSystem.GetKernelCMIRPNotificationProfileExceptionHelper.write(_out, _ex2);
			}
				break;
			}
			case 3: // get_nrm_irp_version
			{
			try
			{
				ManagedGenericIRPConstDefs.VersionNumberSetHolder _arg0= new ManagedGenericIRPConstDefs.VersionNumberSetHolder();
				ManagedGenericIRPConstDefs.VersionNumberSetHolder _arg1= new ManagedGenericIRPConstDefs.VersionNumberSetHolder();
				_out = handler.createReply();
				get_nrm_irp_version(_arg0,_arg1);
				ManagedGenericIRPConstDefs.VersionNumberSetHelper.write(_out,_arg0.value);
				ManagedGenericIRPConstDefs.VersionNumberSetHelper.write(_out,_arg1.value);
			}
			catch(KernelCmIRPSystem.GetNRMIRPVersion _ex0)
			{
				_out = handler.createExceptionReply();
				KernelCmIRPSystem.GetNRMIRPVersionHelper.write(_out, _ex0);
			}
				break;
			}
		}
		return _out;
	}

	public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id)
	{
		return ids;
	}
}
